import request from "@/utils/request.js";

// 获取系统统计数据
export function getSystemStats() {
  return request({
    method: "get",
    url: "/api/system/stats",
  });
}

// 获取用户增长图表数据
export function getUserGrowthData() {
  return request({
    method: "get",
    url: "/api/charts/userGrowth",
  });
}

// 获取销售数据图表
export function getSalesData() {
  return request({
    method: "get",
    url: "/api/charts/salesData",
  });
}

// 获取订单状态数据
export function getOrderStatusData() {
  return request({
    method: "get",
    url: "/api/charts/orderStatus",
  });
}

// 获取通知列表
export function getNotifications() {
  return request({
    method: "get",
    url: "/api/notifications",
  });
}

// 标记通知为已读
export function markNotificationRead(id) {
  return request({
    method: "put",
    url: `/api/notifications/${id}/read`,
  });
}

// 获取系统配置
export function getSystemConfig() {
  return request({
    method: "get",
    url: "/api/system/config",
  });
}
